home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib15.dsk
/
SBASIC SAMPLE.TEXT.txt
< prev
next >
Wrap
Text File
|
2023-02-26
|
2KB
|
65 lines
HOME
*************************************************************
* *
* S-BASIC TEST PROGRAM THE NIBBLE PROGRAMMER *
* *
* THIS PROGRAM GENERATES RANDOM LENGTH LINES IN LO-RES *
* GRAPHICS, WHOSE COLORS CHANGE DEPENDING ON *
* THE SETTING OF PADDLE 0 *
* *
*************************************************************
*
PRINT "TURN PADDLE 0 TO GET DIFFERENT COLORS"
PRINT
#STARTOVER
LOOP
PRINT "TYPE V FOR VERTICAL LINES ONLY"
PRINT "TYPE H FOR HORIZONTAL LINES ONLY"
PRINT "TYPE B FOR BOTH"
INPUT C$
EXIT LOOP IF C$="V" OR C$="H" OR C$="B"
ENDLOOP
IF C$="V"
PRINT "GENERATING VERTICAL LINES ONLY"
ELSE IF C$="H"
PRINT "GENERATING HORIZONTAL LINES ONLY"
ELSE
PRINT "GENERATING BOTH VERTICAL AND HORIZONTAL LINES"
ENDIF
PRINT "PRESS ANY KEY TO QUIT"
FOR I=0 TO 3000
NEXT
GR
POKE 49234,0
*CLEAR THE ENTIRE LO-RES SCREEN
FOR I=1024 TO 2047
POKE I,0
NEXT
WHILE PEEK ( - 16384) < 127
I = RND (1) * 39
J = RND (1) * 47
P = INT ( PDL (0) / 19)
COLOR= RND (1) * 3 + P
IF C$="H" OR C$="B"
MH=RND(1)*39+1
LH=RND(1)*39
HLIN LH,MH AT J
ENDIF
IF C$="V" OR C$="B"
LV=RND(1)*47
MV=RND(1)*47+1
VLIN LV,MV AT I
ENDIF
ENDWHILE
TEXT
HOME
*CLEAR KEYBOARD STROBE
POKE 49168,0
INPUT "RUN AGAIN? ";C$
IF C$="Y" OR C$="YES"
GOTO STARTOVER
ENDIF
END
QUIT